package org.blog.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;

@Data
@ApiModel(value = "用户登录表")
@TableName(value = "blog_user_login")
public class BlogUserLogin {
    @ApiModelProperty(value = "用户登录信息表主键")
    @TableId(value = "id")
    private String id;

    @ApiModelProperty(value = "用户id")
    @TableField(value = "user_id")
    private String userId;

    @ApiModelProperty(value = "登录ip")
    @TableField(value = "login_ip")
    private String loginIp;

    @ApiModelProperty(value = "登录位置")
    @TableField(value = "login_location")
    private String loginLocation;

    @ApiModelProperty(value = "登录结果，0：登录失败，1：登录成功")
    @TableField(value = "login_result")
    private Integer loginResult;

    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(value = "create_time")
    private Date createTime;
}

